//
//  WKCommentListVC.m
//  WKMaybell
//
//  Created by 何文虎 on 2019/4/11.
//  Copyright © 2019 何文虎. All rights reserved.
//

#import "WKCommentListVC.h"
#import "WKCommentHomeCell.h"
#import "WKCMSenderView.h"

#define COMENT_HEIGHT 44.0f

@interface WKCommentListVC ()<UITableViewDelegate,UITableViewDataSource>
{
    WKCMSenderView *_senderView;
}
@property(nonatomic,strong)UITableView *tableView;
@end

@implementation WKCommentListVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initViews];
}

- (void)initViews{
    
    self.naviBar.title = @"评论详情";
    self.view.backgroundColor = [UIColor whiteColor];
    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, NavBarHeight, ScreenWidth, ScreenHeight-NavBarHeight-COMENT_HEIGHT) style:UITableViewStylePlain];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    [_tableView registerClass:[WKCommentHomeCell class] forCellReuseIdentifier:NSStringFromClass([WKCommentHomeCell class])];
    [self.view addSubview:_tableView];
    
    _senderView = [[WKCMSenderView alloc]initWithFrame:CGRectMake(0, ScreenHeight-COMENT_HEIGHT, ScreenWidth, COMENT_HEIGHT)];
    [self.view addSubview:_senderView];
    
    
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    WKCommentHomeCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([WKCommentHomeCell class]) forIndexPath:indexPath];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 233;
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
